package com.zkyc.framework.user.controller;

import com.zkyc.framework.common.dto.PageDto;
import com.zkyc.framework.common.vo.ResultVO;
import com.zkyc.framework.user.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author bing.bai
 * @create 2022/5/26
 */
@RestController
@RequestMapping("log")
public class LogController {

    @Autowired
    private LogService logService;

    @GetMapping("getLoginLogs")
    public ResultVO getLoginLogs(String beginDate, String endDate,String userName,@RequestParam(value = "current", required = false, defaultValue = "0") Integer current, @RequestParam(value = "size", required = false, defaultValue = "0") Integer size) {
        return logService.getLoginLogs(beginDate,endDate,userName,current,size);
    }

    @GetMapping("getOperateLogs")
    public ResultVO getOperateLogs(Integer websiteId,String beginDate, String endDate,String userName,String type,String detail,@RequestParam(value = "current", required = false, defaultValue = "0") Integer current, @RequestParam(value = "size", required = false, defaultValue = "0") Integer size) {
        return logService.getOperateLogs(websiteId,beginDate,endDate,userName,type,detail,current,size);
    }

}
